
package com.oahcfly.chgame.egret.ui.property;

import com.badlogic.gdx.utils.ObjectMap;

public abstract class BaseUIProperty {

	public BaseUIProperty (ObjectMap<String, String> attributes) {

		if (attributes.containsKey("x")) this._x = Float.valueOf(attributes.get("x"));

		if (attributes.containsKey("y")) this._y = Float.valueOf(attributes.get("y"));

		if (attributes.containsKey("width")) this._width = Integer.valueOf(attributes.get("width"));

		if (attributes.containsKey("height")) this._height = Integer.valueOf(attributes.get("height"));

		if (attributes.containsKey("id")) this._id = attributes.get("id");

		if (attributes.containsKey("horizontalCenter")) this._horizontalCenter = Float.valueOf(attributes.get("horizontalCenter"));

		if (attributes.containsKey("verticalCenter")) this._verticalCenter = Float.valueOf(attributes.get("verticalCenter"));

		if (attributes.containsKey("left")) this._left = Float.valueOf(attributes.get("left"));

		if (attributes.containsKey("top")) this._top = Float.valueOf(attributes.get("top"));

		if (attributes.containsKey("right")) this._right = Float.valueOf(attributes.get("right"));

		if (attributes.containsKey("bottom")) this._bottom = Float.valueOf(attributes.get("bottom"));

		if (attributes.containsKey("touchEnabled")) this._touchEnabled = Boolean.valueOf(attributes.get("touchEnabled"));

		if (attributes.containsKey("scaleX")) this._scaleX = Float.valueOf(attributes.get("scaleX"));

		if (attributes.containsKey("scaleY")) this._scaleY = Float.valueOf(attributes.get("scaleY"));

		if (attributes.containsKey("visible")) this._visible = Boolean.valueOf(attributes.get("visible"));
	}

	public String _id = null;
	public boolean _isPopUp = false;
	public Object _owner = null;
	public boolean _updateCompletePendingFlag = false;
	public boolean _initialized = false;
	public int _nestLeveler = 0;
	public boolean _enabled = true;
	public int _width = 0;
	public int _height = 0;
	public int _minWidth = 0;
	public int _maxWidth = 10000;
	public int _minHeight = 0;
	public int _maxHeight = 10000;
	public int _measuredWidth = 0;
	public int _measuredHeight = 0;
	public float _left = -1;
	public float _right = -1;
	public float _top = -1;
	public float _bottom = -1;
	public float _horizontalCenter = -1;
	public float _verticalCenter = -1;
	public float _percentWidth = -1;
	public float _percentHeight = -1;
	public boolean _includeInLayout = true;

	public boolean _touchEnabled = true;
	public boolean _visible = true;

	public float _x = 0;
	public float _y = 0;
	public float _scaleX = 1;
	public float _scaleY = 1;
	public float _anchorX = 0;
	public float _anchorY = 0;
	public int _rotation = 0;
	public float _alpha = 1;
}
